<%@page import="com.ambow.Entity.*"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="Keywords" content="关键词1,关键词2，关键词3,关键词4,……" />
<meta name="Description" content="你网页的简述" />
<meta name="Robots" content="All" />
<meta name="Generator" content="Dreamweaver" />
<title>菜单管理</title>
<link href="<%=path %>/static/css/css.css" rel="stylesheet" type="text/css" />
<script>
	function yan(){
		if(frm.supplyName.value == ""){
			alert("供应商名称不能为空");
			document.frm.supplyName.focus();
			return (false);
		}
	}

</script>
</head>

<body>
	<h3 id="subTitle">报销查询－按供应商</h3>
	<table width="90%" border="0" align="center" cellpadding="0"
		cellspacing="0" class="table2">
		<form action="<%=path %>/PaymentServlet?status=query" method="post" name="frm" onsubmit="return yan()">
			<tr>
				<td nowrap="nowrap" align="center">输入供应商名：</td>
				<td nowrap="nowrap"><input name="supplyName" type="text"
					class="transparent" id="supplyName"/> <input name="flag" type="radio"
					class="transparent" value="未报销" checked="checked"/>未报销 <input name="flag"
					type="radio" class="transparent" value="已报销" />已报销 <input
					name="flag" type="radio" class="transparent" value="所有" />所有 <input
					name="Submit" type="submit" class="buttonInp" value="查 询" /></td>
			</tr>
		</form>
	</table>
	<table width="90%" border="0" align="center" cellpadding="0"
		cellspacing="0" class="table">
		<form action="" method="post" name="form1" id="form1">
			<tr>
				<th width="17%" align="center" nowrap="nowrap" class="title2">书籍</th>
				<th width="15%" align="center" nowrap="nowrap" class="title2">数目</th>
				<th width="37%" align="15%" nowrap="nowrap" class="title2">供应商</th>
				<th width="19%" align="15%" nowrap="nowrap" class="title2">入库时间</th>
				<th width="12%" align="15%" nowrap="nowrap" class="title2">当前状态</th>
			</tr>
			<%
						List<Payment> payments = (List) request.getAttribute("payments");
						if (payments != null && !payments.isEmpty()) {
							for (int i = 0; i < payments.size(); i++) {
					%>
					<tr class="within2bg">
						<td align="center"><%=payments.get(i).getStockReceive().getTextBook().getName()%></td>
						<td align="center"><%=payments.get(i).getStockReceive().getAmount()%></td>
						<td align="center"><%=payments.get(i).getStockReceive().getSupplier().getName()%></td>
						<td align="center"><%=payments.get(i).getStockReceive().getReceiveDate()%></td>
						<td align="center"><span class="font_hilite"><%=payments.get(i).getStatus()%></span></td>
					</tr>
					<%
						}
						} else {
					%>
					<tr align="center" class="within2bg">
						<td colspan="7" class="no_note">没有符合条件的记录</td>
					</tr>
					<%
						}
					%>
		</form>
	</table>
	
</body>
</html>